import Vue from "vue";
import VueRouter from "vue-router";
import Login from "@v/headcontent/Login.vue"
import Register from "@v/headcontent/Register.vue"
import Indexx from "@v/Indexx.vue";
import InfoInput from "@v/stu_info_content/InfoInput.vue"
import InfoInquer from "@v/stu_info_content/InfoInquer.vue"
import InfoInquerImg from "@v/stu_info_content/InfoInquerImg.vue"
import InfoInquerNoImg from "@v/stu_info_content/InfoInquerNoImg.vue"
import ScoreInput from "@v/stu_score_content/ScoreInput.vue"
import EnterExamScoreInquire from "@v/stu_score_content/EnterExamScoreInquire.vue";
import MidExamScoreInquire from "@v/stu_score_content/MidExamScoreInquire.vue"
import EndExamScoreInquire from "@v/stu_score_content/EndExamScoreInquire.vue"
import AllScoreInquire from "@v/stu_score_content/AllScoreInquire.vue"
import DeleteScore from "@v/stu_score_content/DeleteScore.vue"
import ChangeScore from "@v/stu_score_content/ChangeScore.vue"
import ShouYe from "@v/headcontent/ShouYe.vue"
import NotFound from "../views/NotFound.vue"
import StudentDetail from '@v/stu_score_content/StudentDetail.vue';
import ScoreFenXi from '@v/stu_score_content/ScoreFenXi.vue';
Vue.use(VueRouter)

const router = new VueRouter({
    mode: "hash",
    routes: [{
            path: "/Login",
            name: "login",
            component: Login,
            meta: {
                show: 2
            }
        },
        {
            path: "/Register",
            name: "register",
            component: Register,
            meta: {
                show: 2
            }
        }, {
            path: "/CameraUpload",
            name: "cameraupdate",
            component: () => import("../views/headcontent/CameraUpload.vue")
        },
        {
            path: "/InfoInput",
            name: "infoinput",
            component: InfoInput
        },
        {
            path: "/InfoInquer",
            name: "infoinquer",
            component: InfoInquer
        },
        {
            path: "/InfoInquerImg",
            name: "infoinquerimg",
            component: InfoInquerImg
        },
        {
            path: "/InfoInquerNoImg",
            name: "infoinquernoimg",
            component: InfoInquerNoImg
        },
        {
            path: "/ScoreInput",
            name: "scoreinput",
            component: ScoreInput
        },
        {
            path: "/EnterExamScoreInquire",
            name: "enterexamscoreinquire",
            component: EnterExamScoreInquire
        },
        {
            path: "/MidExamScoreInquire",
            name: "midexamscoreinquire",
            component: MidExamScoreInquire
        },
        {
            path: "/EndExamScoreInquire",
            name: "endexamscoreinquire",
            component: EndExamScoreInquire
        },
        {
            path: "/AllScoreInquire",
            name: "allscoreinquire",
            component: AllScoreInquire,
            meta: [{
                name: "学生信息管理",
                url: '/indexx'
            }, {
                name: "全部信息查询",
            }]
        },
        {
            path: "/DeleteScore",
            name: "deletescore",
            component: DeleteScore
        },
        {
            path: "/ChangeScore",
            name: "changescore",
            component: ChangeScore
        }, {
            path: "/StudentDetail",
            name: "studentdetail",
            component: StudentDetail
        },
        {
            path: "/ScoreFenXi",
            name: "scorefenxi",
            component: ScoreFenXi
        },
        {
            path: "/Indexx",
            name: "indexx",
            component: Indexx
        },
        {
            path: "/",
            name: "shouye",
            component: ShouYe,
            meta: {
                show: true
            }
        }, {
            path: "*",
            name: "notfound",
            component: NotFound
        },
    ]
})


router.beforeEach((to, from, next) => {
    next()
})



export default router